package com.qiaofang.applet.service.other.repository;

import com.qiaofang.applet.service.other.domain.DictCorp;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author daiyuxiang
 */
@Repository
public interface DictCorpRepository extends MongoRepository<DictCorp, String> {
    void deleteAllByCorporationCode(String corporationCode);

    void deleteAllByCorporationCodeAndDictType(String corporationCode, String dictType);

    List<DictCorp> findAllByCorporationCode(String corporationCode);

    DictCorp findFirstByCorporationCodeAndDictType(String corporationCode, String dictType);
}
